Distributed block storage service command processing method, apparatus, device and medium

ABSTRACT

Disclosed are a distributed block storage service command processing method, apparatus, a device and a medium. The method includes: by means of tgtadm, acquiring a rbd command of a block storage service, parsing the rbd command to obtain a corresponding task parameter, and then transmitting the task parameter to an ISCSI target (S 11 ); by means of tgtd, starting a dedicated thread for processing a task corresponding to the task parameter, and monitoring a real-time processing result of the current task (S 12 ); and returning the real-time processing result to the tgtadm by means of the ISCSI target, whereby the tgtadm displays the real-time processing result on a human-computer interface (S 13 ).

This application claims priority to Chinese Patent Application No.201911384349.9, filed on Dec. 28, 2019 in China National IntellectualProperty Administration and entitled “Distributed Block Storage ServiceCommand Processing Method, Apparatus, Device and Medium”, which ishereby incorporated by reference in its entirety.

FIELD

The present application relates to the technical field of computers, inparticular to a distributed block storage service command processingmethod, apparatus, device and medium.

BACKGROUND

RBD block storage is the most widely used and stable storage type amongthree storage types provided by Ceph. A RBD block is similar to a diskand can be mounted into physical or virtual machines. In the ISCSI(Internet Small Computer System Interface), mainly through a technologyof TCP/IP (Transmission Control Protocol/Internet protocol), a storagedevice (RBD) is made, via an ISCSI target function, into a server sidecapable of providing a disk, and is then made, via an ISCSI initiatorfunction, into a client capable of mounting and using an ISCSI target.In this way, application of disks can be achieved via an ISCSI protocol.In other words, the ISCSI architecture mainly divides the storage deviceand a host used into two parts, including:

1. ISCSI target: It is a storage device side, namely a device thatstores a disk or RAID (Redundant Array of Independent Disks). Atpresent, a Linux host can also be simulated as an ISCSI target, toprovide a disk for use by other hosts.

2. ISCSI initiator: It is a client that can use the target, usually aserver. That is to say, a server that intends to be connected to theISCSI target needs to have the relevant functions of the ISCSI initiatorinstalled before using the disk provided by the ISCSI target.

In practical applications, a client terminal can achieve operation onthe block storage by establishing librbd (that is, a block storagelibrary provided by Ceph, which achieves a RBD interface) which isconnected to and accesses a bottom layer with tgt (that is, a Linux SCSItarget framework, an ISCSI target implemented by a user state). Aplurality of block devices can be mapped to one target, and a pluralityof targets can be established on one tgt. The client terminal can beconnected to one or more targets on the tgt for access. The tgt canestablish a LUN (Logical Unit Number) to provide block services to theclient, and one LUN corresponds to one block storage volume.

In the prior art, the RBD can manage volumes, snapshots, clones, etc.through command lines, but if a volume is being mounted and used by theISCSI target, that is, if the volume has been opened, and at this time,if the volume and the snapshot are being modified through a rbd commandline, an ISCSI target service will not be able to use simultaneoussnapshot rollback. Currently, the Ceph does not support online rollback.If snapshot rollback is required, mapping volumes need to be unloadedlayer by layer, then rolled back, and finally re-mapped and mounted.Such a process is quite cumbersome. At the same time, if rbd is oneprogress, and the command is called very frequently, a large number ofprogresses will be started, whereby a large number of unrelated serviceswill appear in a cluster and affect the overall performance. In adistributed deployment scenario with an extremely high performancerequirement, it will inevitably affect the user experience.

SUMMARY

In view of this, the present application aims to provide a distributedstorage block command processing method, apparatus, device and medium,which can simplify a command processing flow and reduce a cluster load,thus improving the overall performance of a cluster. The specificsolution is as follows:

In a first aspect, the present application discloses a distributed blockstorage service command processing method based on an ISCSI, including:

by means of tgtadm (a management tool of tgt, that is, a Linux SCSItarget framework management tool), acquiring a rbd command of a blockstorage service, parsing the rbd command to obtain a corresponding taskparameter, and then transmitting the task parameter to an ISCSI target;

by means of tgtd (daemon of the tgt, that is, a Linux SCSI targetframework daemon progress), starting a dedicated thread for processing atask corresponding to the task parameter, and monitoring a real-timeprocessing result of the current task; and

returning the real-time processing result to the tgtadm by means of theISCSI target, whereby the tgtadm displays the real-time processingresult on a human-computer interface.

Optionally, the transmitting the task parameter to an ISCSI target bymeans of tgtadm includes:

transmitting the task parameter to the ISCSI target by means of tgtadmand on the basis of an IPC (Inter-Process Communication) manner.

Correspondingly, the returning the real-time processing result to thetgtadm by means of the ISCSI target includes:

returning the real-time processing result to the tgtadm by means of theISCSI target and on the basis of the IPC manner.

Optionally, during starting, by means of tgtd, a dedicated thread forprocessing a task corresponding to the task parameter, the methodfurther includes:

deleting a file descriptor (fd) from epoll monitoring.

Optionally, the process of monitoring a real-time processing result ofthe current task by means of tgtd includes:

setting, by means of the tgtd, a callback function, and acquiring, bymeans of the callback function, a real-time processing result of thecurrent task.

Optionally, the setting, by means of the tgtd, a callback function, andacquiring, by means of the callback function, a real-time processingresult of the current task includes:

by means of the tgtd, setting a callback function, and transmitting thecallback function and the task parameter to the block storage service,whereby the block storage service calls the callback function to returna corresponding real-time processing progress to the tgtd when a targetprogress state corresponding to the task parameter has an update.

Optionally, the returning the real-time processing result to the tgtadmby means of the ISCSI target, whereby the tgtadm displays the real-timeprocessing result on a human-computer interface includes:

by means of the ISCSI target, parsing the real-time processing progress,calculating a corresponding progress percentage, and then returning theprogress percentage to the tgtadm, whereby the tgtadm converts theprocess percentage into a corresponding progress bar, and displays theprogress bar on a human-computer interface.

Optionally, the acquiring, by means of the callback function, thereal-time processing result of the current task further includes:

acquiring an error code of the current task by means of the callbackfunction.

In a second aspect, the present application discloses a distributedblock storage service command processing apparatus based on an ISCSI,including:

a command acquiring module configured for acquiring, by means of tgtadm,a rbd command of a block storage service;

a command parsing module configured for parsing, by means of the tgtadm,the rbd command to obtain a corresponding task parameter, and thentransmitting the task parameter to an ISCSI target;

a thread starting module configured for starting, by means of tgtd, adedicated thread for processing a task corresponding to the taskparameter;

a result monitoring module configured for monitoring, by means of thetgtd, a real-time processing result of the current task; and

a result returning module configured for returning, by means of theISCSI target, the real-time processing result to the tgtadm, whereby thetgtadm displays the real-time processing result on a human-computerinterface.

In a third aspect, the present application discloses an electronicdevice, including:

a memory configured for storing a computer program; and

a processor configured for executing the computer program to implementthe before-mentioned distributed block storage service commandprocessing method based on the ISCSI.

In a fourth aspect, the present application discloses acomputer-readable storage medium configured for storing a computerprogram to implement the afore-mentioned distributed block storageservice command processing method based on the ISCSI.

In the present application, the rbd command of the block storage serviceis acquired by means of the tgtadm, and the corresponding task parameteris moved upwards to the ISCSI target; by means of the tgtd, thededicated thread for processing the task corresponding to the taskparameter is started, and the real-time processing result is monitored;and the real-time processing result is then returned to the tgtadm bymeans of the ISCSI target, whereby the tgtadm displays the real-timeprocessing result on the human-computer interface. Therefore, in thepresent application, the rbd command is moved upwards to a target layer,which is equivalent to moving operations for volumes, snapshots, andclones upwards to the target layer for processing. In this case, if itis necessary to carry out operations such as volume modification andsnapshot rollback, related scheduling can be directly completed on thetarget layer without an operation of unmounting and mounting again. Thisprocess is insensitive to users. In this way, a large amount of humanlabor can be saved, the flow is simplified, and the user experience isimproved. Moreover, after a large number of query commands are movedupwards to the target layer, many processes and io flows irrelevant tobusinesses are reduced in a distributed cluster, thus greatly reducingthe cluster load.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to describe the embodiments of the present invention or thetechnical solutions in the existing art more clearly, drawings requiredto be used in the embodiments or the illustration of the existing artwill be briefly introduced below. Apparently, the drawings in theillustration below are only some embodiments of the present application.Those ordinarily skilled in the art also can obtain other drawingsaccording to the provided drawings without creative work.

FIG. 1 is a flow chart of a distributed block storage service commandprocessing method based on an ISCSI disclosed by the presentapplication;

FIG. 2 is a flow chart of a specific distributed block storage servicecommand processing method based on an ISCSI disclosed by the presentapplication;

FIG. 3 is a flow chart of a specific distributed block storage servicecommand processing method based on an ISCSI disclosed by the presentapplication;

FIG. 4 is a schematic structural diagram of a distributed block storageservice command processing apparatus based on an ISCSI disclosed by thepresent application; and

FIG. 5 is a structural diagram of an electronic device disclosed by thepresent application.

DETAILED DESCRIPTION

The technical solutions in the embodiments of the present applicationwill be clearly and completely described below with reference to theaccompanying drawings in the embodiments of the present application.Obviously, the described embodiments are only a part of the embodimentsof the present application, rather than all the embodiments. Based onthe embodiments of the present application, all other embodimentsobtained by those skilled in the art without creative work shall fallwithin the protection scope of the present application.

In the prior art, the RBD can manage volumes, snapshots, clones, etc.through command lines, but if a volume is being mounted and used by theISCSI target, that is, if the volume has been opened, and at this time,if the volume and the snapshot are being modified through a rbd commandline, an ISCSI target service will not be able to use simultaneoussnapshot rollback. Currently, the Ceph does not support online rollback.If snapshot rollback is required, mapping volumes need to be unloadedlayer by layer, then rolled back, and finally re-mapped and mounted.Such a process is quite cumbersome. At the same time, if rbd is oneprogress, and the command is called very frequently, a large number ofprogresses will be started, whereby a large number of unrelated serviceswill appear in a cluster and affect the overall performance. In adistributed deployment scenario with an extremely high performancerequirement, it will inevitably affect the user experience. In view ofthis, the present application provides a distributed storage blockcommand processing solution, which can simplify a command processingflow and reduce a cluster load, thus improving the overall performanceof a cluster.

Referring to FIG. 1, an embodiment of the present application disclosesa distributed block storage service command processing method based onan ISCSI, including the following steps:

Step S11: by means of tgtadm, acquiring a rbd command of a block storageservice, parsing the rbd command to obtain a corresponding taskparameter, and then transmitting the task parameter to an ISCSI target.

In this embodiment, the tgtadm is a management tool, and the objects itmanages include a target.

It should be noted that the rbd command in this embodiment includes, butnot limited to, relevant operation commands for volumes, snapshots, andclones.

In this embodiment, the tgtadm and the ISCSI target may communicate witheach other on the basis of an IPC manner. That is, the task parameter istransmitted to the ISCSI target by means of tgtadm, specificallyincluding: the task parameter is transmitted to the ISCSI target bymeans of tgtadm and on the basis of the IPC manner.

Step S12: by means of tgtd, starting a dedicated thread for processing atask corresponding to the task parameter, and monitoring a real-timeprocessing result of the current task.

In this embodiment, in order to reduce the influence of the blockstorage service on other businesses, the dedicated thread is started bymeans of the tgtd, which is specifically used for processing the taskcorresponding to the above task parameter.

Further, in order to prevent the task from being triggered by mistakesubsequently when the real-time processing result such as progressinformation is sent, in this embodiment, the starting the dedicatedthread for processing the task corresponding to the task parameter bymeans of tgtd may further includes: deleting an fd from epollmonitoring.

In addition, in order to achieve monitoring for the real-time processingresult of the current task, this embodiment may be implemented with thecallback function. That is, in this embodiment, the process ofmonitoring a real-time processing result of the current task by means oftgtd may specifically include: setting, by means of the tgtd, a callbackfunction, and acquiring, by means of the callback function, a real-timeprocessing result of the current task.

In this embodiment, the acquiring, by means of the callback function,the real-time processing result of the current task may specificallyinclude: acquiring, by means of the callback function, a real-timeprocessing progress of the current task. Further, the acquiring, bymeans of the callback function, the real-time processing result of thecurrent task may further include: acquiring, by means of the callbackfunction, an error code of the current task. That is, the real-timeprocessing result in this embodiment may specifically include thereal-time processing progress or the error code of the current task.

Step S13: returning the real-time processing result to the tgtadm bymeans of the ISCSI target, whereby the tgtadm displays the real-timeprocessing result on a human-computer interface.

Specifically, the returning the real-time processing result to thetgtadm by means of the ISCSI target may include includes: returning thereal-time processing result to the tgtadm by means of the iscis targetand on the basis of the IPC manner.

In the embodiments of present application, the rbd command of the blockstorage service is acquired by means of the tgtadm, and thecorresponding task parameter is moved upwards to the ISCSI target; bymeans of the tgtd, the dedicated thread for processing the taskcorresponding to the task parameter is started, and the real-timeprocessing result is monitored; and the real-time processing result isthen returned to the tgtadm by means of the ISCSI target, whereby thetgtadm displays the real-time processing result on the human-computerinterface. Therefore, in the embodiments of the present application, therbd command is moved upwards to a target layer, which is equivalent tomoving operations for volumes, snapshots, and clones upwards to thetarget layer for processing. In this case, if it is necessary to carryout operations such as volume modification and snapshot rollback,related scheduling can be directly completed on the target layer withoutan operation of unmounting and mounting again. This process isinsensitive to users. In this way, a large amount of human labor can besaved, the flow is simplified, and the user experience is improved.Moreover, after a large number of query commands are moved upwards tothe target layer, many processes and io flows irrelevant to businessesare reduced in a distributed cluster, thus greatly reducing the clusterload.

Referring to FIG. 2, an embodiment of the present application disclosesa particular distributed block storage service command processing methodbased on an ISCSI, including the following steps:

Step S21: by means of tgtadm, acquiring a rbd command of a block storageservice, parsing the rbd command to obtain a corresponding taskparameter, and then transmitting the task parameter to an ISCSI targetin an IPC manner.

Step S22: starting, by means of tgtd, a dedicated thread for processinga task corresponding to the task parameter, and setting a callbackfunction, and transmitting the callback function and the task parameterto the block storage service, whereby the block storage service callsthe callback function to return a corresponding real-time processingprogress to the tgtd when a target progress state corresponding to thetask parameter has an update.

In this embodiment, after the ISCSI target receives the task parameter,the tgtd will start the corresponding dedicated task processing thread,set the callback function, and then transmit the callback function andthe task parameter to the block storage service. In this way, when thetarget progress state corresponding to the task parameter has an update,the block storage service may directly actively call the above callbackfunction, so as to return the corresponding real-time processingprogress to the tgtd and achieve the purpose of the tgtd for monitoringthe real-time processing result of the current task.

Step S23: by means of the ISCSI target, parsing the real-time processingprogress, calculating a corresponding progress percentage, and thenreturning the progress percentage to the tgtadm in an IPC manner,whereby the tgtadm converts the process percentage into a correspondingprogress bar, and displays the progress bar on a human-computerinterface.

In this embodiment, the iscis target will calculate the progresspercentage corresponding to the above real-time processing progress, andsend the progress percentage to the tgtadm in the IPC manner. Afteracquiring the above progress percentage, the tgtadm may convert the sameinto the corresponding visual progress bar, and send the progress bar tothe human-computer interface for display. In this way, a user canvisually and timely know the processing process of the current task.

FIG. 3 illustrates a flow of a specific distributed block storageservice command processing method based on an ISCSI disclosed by thepresent application. In FIG. 3, a command line parameter of the blockstorage service is transferred to an ISCSI target layer for redesign,and is transmitted to the tgtd in the IPC manner. In order to reduce theinfluence of the interaction of the block storage service on otherbusinesses, the tgtd starts a thread to independently process this typeof task, and deletes the fd from the epoll monitoring to prevent mistaketriggering of the task at each transmission of the progress. Aneed_process sign is designed to indicate whether it is necessary toprint a progress bar, and this sign is set to be true only for a commandline that needs a progress bar; progress_count is designed at the tgtadmto mark the number of replies. At each time when the tgtd replies,progress_count++ is executed. At the first receiving by the tgtadm, itis determined that progress is 1, that is, a label is added on theprogress during printing to indicate a command; designing progress marksthe current progress percentage; designing complete marks whether it iscompleted; and the tgtadm controls the percentage process in eachupdate. When progress_count is not 1, and progress is not 0, thefollowing code is executed:

printf (stdout, “%.s”, 4, backspace), completing a command line, anddisplaying backspace. When the complete sign is not true, the followingcode is executed:

fprintf (stdout, “%*u % %”, 3, progress), completing the printing of theprogress bar.

In FIG. 3, at the ISCSI target, by means of the tgtd, the callbackfunction is designed, and a pointer of the function is transmitted tothe block storage service. This function is called when there is aprogress update during the task processing by the block storage service.The ISCSI target will parse the progress, calculate the percentage, andsend, through an IPC socket, a message to the tgtadm, and the tgatdmthen displays a task progress on an interface of a console.

It can be seen that in this embodiment, each rbd command is movedupwards to the target layer, and various processing logics are managedin the ISCSI target layer. Various operations can be performed onvolumes without canceling volume mapping. The tgtd sets the callbackresponsible for receiving the progress of the block storage service andsending the same to the tgtadm, and the progress will be shown to theuser through an algorithm. The ISCSI commands error code information tobe returned. That is, in this embodiment, the rbd command is movedupwards to the ISCSI target layer; the target layer receives anupper-layer task and acts as an intermediate layer between the rbd andthe user; the ISCSI target indirectly designs the callback to acquirethe processing progress or error code of the block storage service, andtransmits the same to the tgtadm by the IPC; the tgtadm shows theprogress to the user through the algorithm, and displays the error code.Through the above solution, the operations such as volume renaming andvolume deletion can be performed without canceling the volume mapping.

Referring to FIG. 4, an embodiment of the present application furthercorrespondingly discloses a distributed block storage service commandprocessing apparatus based on an ISCSI, including:

a command acquiring module 11 configured for acquiring, by means oftgtadm, a rbd command of a block storage service;

a command parsing module 12 configured for parsing, by means of thetgtadm, the rbd command to obtain a corresponding task parameter, andthen transmitting the task parameter to an ISCSI target;

a thread starting module 13 configured for starting, by means of tgtd, adedicated thread for processing a task corresponding to the taskparameter;

a result monitoring module 14 configured for monitoring, by means of thetgtd, a real-time processing result of the current task; and

a result returning module 15 configured for returning, by means of theISCSI target, the real-time processing result to the tgtadm, whereby thetgtadm displays the real-time processing result on a human-computerinterface.

In the embodiments of present application, the rbd command of the blockstorage service is acquired by means of the tgtadm, and thecorresponding task parameter is moved upwards to the ISCSI target; bymeans of the tgtd, the dedicated thread for processing the taskcorresponding to the task parameter is started, and the real-timeprocessing result is monitored; and the real-time processing result isthen returned to the tgtadm by means of the ISCSI target, whereby thetgtadm displays the real-time processing result on the human-computerinterface. Therefore, in the embodiments of the present application, therbd command is moved upwards to a target layer, which is equivalent tomoving operations for volumes, snapshots, and clones upwards to thetarget layer for processing. In this case, if it is necessary to carryout operations such as volume modification and snapshot rollback,related scheduling can be directly completed on the target layer withoutan operation of unmounting and mounting again. This process isinsensitive to users. In this way, a large amount of human labor can besaved, the flow is simplified, and the user experience is improved.Moreover, after a large number of query commands are moved upwards tothe target layer, many processes and io flows irrelevant to businessesare reduced in a distributed cluster, thus greatly reducing the clusterload.

In one specific embodiment, the command parsing module 12 includes:

a command parsing unit configured for parsing, by means of the tgtadm,the rbd command to obtain a corresponding task parameter;

a parameter transmission unit configured for transmitting the taskparameter to the ISCSI target by means of tgtadm and on the basis of anIPC manner.

In one specific embodiment, the result returning module 15 isspecifically configured for returning, by means of the ISCSI target, thereal-time processing result to the tgtadm in an IPC manner, whereby thetgtadm displays the real-time processing result on a human-computerinterface.

In one specific embodiment, the thread starting module 13 furtherincludes: a descriptor deleting unit configured for, during thestarting, by means of tgtd, a dedicated thread for processing a taskcorresponding to the task parameter, deleting an fd from epollmonitoring.

In one specific embodiment, the result monitoring module 14 includes:

a callback setting sub-module configured for setting, by means of thetgtd, a callback function, and acquiring, by means of the callbackfunction, a real-time processing result of the current task.

In one specific embodiment, the callback setting sub-module includes:

a callback setting unit configured for setting, by means of the tgtd, acallback function;

an information transmission unit configured for transmitting thecallback function and the task parameter to the block storage service,whereby the block storage service calls the callback function to returna corresponding real-time processing progress to the tgtd when a targetprogress state corresponding to the task parameter has an update.

In one specific embodiment, the result returning module 15 isspecifically configured for, by means of the ISCSI target, parsing thereal-time processing progress, calculating a corresponding progresspercentage, and then returning the progress percentage to the tgtadm,whereby the tgtadm converts the progress percentage into a correspondingprogress bar, and displays the progress bar on a human-computerinterface.

In one specific embodiment, the callback setting sub-module furtherincludes:

an error code acquisition unit configured for acquiring an error code ofthe current task by means of the callback function.

Further, an embodiment of the present application further provides anelectronic device. FIG. 5 is a structural diagram of an electronicdevice 20 illustrated according to an exemplary embodiment. The contentin the figure cannot be deemed as any limitation to the applicationrange of the present application.

FIG. 5 is a schematic structural diagram of an electronic device 20provided in an embodiment of the present application. The electronicdevice 20 may specifically include: at least one processor 21, at leastone memory 22, a power supply 23, a communication interface 24, aninput/output interface 25, and a communication bus 26. The memory 22 isconfigured for storing a computer program, and the computer program isloaded and executed by the processor 21 to implement the relevant stepsin the distributed block storage service command processing methoddisclosed in any of the foregoing embodiments.

In this embodiment, the power supply 23 is configured for providing aworking voltage for each hardware device on the electronic device 20.The communication interface 24 can establish a data transmission channelbetween the electronic device 20 and an external device, and acommunication protocol that it follows is applicable to anycommunication protocol in the technical solution of the presentapplication, which is not specifically limited here. The input/outputinterface 25 is configured for acquiring data input from or output tothe outside, and its specific interface type can be selected accordingto specific application needs, which is not specifically limited here.

In addition, the memory 22, as a carrier for resource storage, can be aread-only memory, a random access memory, a magnetic disk or an opticaldisk, etc. Resources stored thereon include an operating system 221, acomputer program 222, data 223, etc., and the storage method can betemporary storage or permanent storage.

The operating system 221 is configured for managing and controlling eachhardware device and computer program 222 on the electronic device 20, soas to achieve operations and processing for massive data 223 in thememory 22 by the processor 21, which can be Windows Server, Netware,Unix, Linux, etc. In addition to including the computer program forcompleting the distributed storage service command processing methodimplemented by the electronic device 20 disclosed in any one of theforegoing embodiments, the computer program 222 may further includecomputer programs for completing other specific operations. The data 223may include various data collected by the electronic device 20.

Further, an embodiment of the present application discloses acomputer-readable storage medium configured for storing a computerprogram to implement the distributed block storage service commandprocessing method based on the ISCSI disclosed in the foregoingembodiment.

All the embodiments in this specification are described in a progressivemanner. Contents mainly described in each embodiment are different fromthose described in other embodiments. Same or similar parts of all theembodiments refer to each other. For the device disclosed in theembodiments, since it corresponds to the method disclosed in theembodiments, the description is relatively simple, and the relevant partcan be referred to the description of the method part.

The steps of a method or algorithm described in conjunction with theembodiments disclosed herein may be directly implemented in hardware, asoftware module executed by a processor, or a combination of thehardware and the software module. The software module can be placed in arandom access memory (RAM), an internal memory, a read only memory(ROM), an electrically programmable ROM, an electrically erasableprogrammable ROM, a register, a hard disk, a mobile disk, a CD-ROM, orany storage medium in other forms known to the technical field.

The above describes the distributed block storage service commandprocessing method and apparatus, a device, and a medium in detailprovided by the present application. Specific examples are used hereinto illustrate the principle and implementation modes of the presentapplication. The descriptions of the above embodiments are only used tohelp understand the method and its key thoughts of the presentapplication. Moreover, for those of ordinary skill in the art, accordingto the ideas of the present application, there will be changes in thespecific implementation modes and the scope of application. In summary,the content of this specification should not be construed as limitingthe present application.

1. A distributed block storage service command processing method,comprising: by means of tgtadm, acquiring a rbd command of a blockstorage service, parsing the rbd command to obtain a corresponding taskparameter, and then transmitting the task parameter to an ISCSI(Internet Small Computer System Interface) target; by means of tgtd,starting a dedicated thread for processing a task corresponding to thetask parameter, and monitoring a real-time processing result of thecurrent task; and by means of the ISCSI target, returning the real-timeprocessing result to the tgtadm, whereby the tgtadm displays thereal-time processing result on a human-computer interface.
 2. Thedistributed block storage service command processing method according toclaim 1, wherein the transmitting the task parameter to an ISCSI targetby means of tgtadm comprises: transmitting the task parameter to theISCSI target by means of the tgtadm and on the basis of an IPC(Inter-Process Communication) manner.
 3. The distributed block storageservice command processing method according to claim 1, wherein at thesame time as the starting, by means of tgtd, a dedicated thread forprocessing a task corresponding to the task parameter, the methodfurther comprises: deleting a file descriptor (fd) from epollmonitoring.
 4. The distributed block storage service command processingmethod according to claim 1, wherein the monitoring a real-timeprocessing result of the current task by means of tgtd comprises:setting, by means of the tgtd, a callback function, and acquiring, bymeans of the callback function, the real-time processing result of thecurrent task.
 5. The distributed block storage service commandprocessing method according to claim 4, wherein the setting, by means ofthe tgtd, a callback function, and acquiring, by means of the callbackfunction, the real-time processing result of the current task comprises:by means of the tgtd, setting the callback function, and transmittingthe callback function and the task parameter to the block storageservice, whereby the block storage service calls the callback functionto return a corresponding real-time processing progress to the tgtd whena target progress state corresponding to the task parameter has anupdate.
 6. The distributed block storage service command processingmethod according to claim 5, wherein the returning the real-timeprocessing result to the tgtadm by means of the ISCSI target, wherebythe tgtadm displays the real-time processing result on a human-computerinterface comprises: by means of the ISCSI target, parsing thecorresponding real-time processing progress, calculating a correspondingprogress percentage, and then returning the corresponding progresspercentage to the tgtadm, whereby the tgtadm converts the correspondingprogress percentage into a corresponding progress bar, and displays thecorresponding progress bar on the human-computer interface.
 7. Thedistributed block storage service command processing method according toclaim 5, wherein the acquiring, by means of the callback function, thereal-time processing result of the current task further comprises:acquiring an error code of the current task by means of the callbackfunction.
 8. (canceled)
 9. An electronic device, characterized bycomprising: a memory configured for storing a computer program; and aprocessor configured for executing the computer program to implement adistributed block storage service command processing method, comprising:by means of tgtadm, acquiring a rbd command of a block storage service,parsing the rbd command to obtain a corresponding task parameter, andthen transmitting the task parameter to an ISCSI target; by means oftgtd, starting a dedicated thread for processing a task corresponding tothe task parameter, and monitoring a real-time processing result of thecurrent task; and returning the real-time processing result to thetgtadm by means of the ISCSI target, whereby the tgtadm displays thereal-time processing result on a human-computer interface.
 10. Anon-transitory computer-readable storage medium, being configured forstoring a computer program to implement a distributed block storageservice command processing method, comprising: by means of tgtadm,acquiring a rbd command of a block storage service, parsing the rbdcommand to obtain a corresponding task parameter, and then transmittingthe task parameter to an ISCSI target; by means of tgtd, starting adedicated thread for processing a task corresponding to the taskparameter, and monitoring a real-time processing result of the currenttask; and returning the real-time processing result to the tgtadm bymeans of the ISCSI target, whereby the tgtadm displays the real-timeprocessing result on a human-computer interface.
 11. The distributedblock storage service command processing method based on the ISCSIaccording to claim 1, wherein the returning the real-time processingresult to the tgtadm by means of the ISCSI target comprises: returningthe real-time processing result to the tgtadm by means of the ISCSItarget and on the basis of an IPC (Inter-Process Communication) manner.12. The electronic device according to claim 9, wherein the transmittingthe task parameter to an ISCSI target by means of tgtadm comprises:transmitting the task parameter to the ISCSI target by means of thetgtadm and on the basis of an IPC (Inter-Process Communication) manner.13. The electronic device according to claim 9, wherein the returningthe real-time processing result to the tgtadm by means of the ISCSItarget comprises: returning the real-time processing result to thetgtadm by means of the ISCSI target and on the basis of an IPC(Inter-Process Communication) manner.
 14. The electronic deviceaccording to claim 9, wherein at the same time as the starting, by meansof tgtd, a dedicated thread for processing a task corresponding to thetask parameter, the method further comprises: deleting a file descriptor(fd) from epoll monitoring.
 15. The electronic device according to claim9, wherein the monitoring a real-time processing result of the currenttask by means of tgtd comprises: setting, by means of the tgtd, acallback function, and acquiring, by means of the callback function, thereal-time processing result of the current task.
 16. The electronicdevice according to claim 15, wherein the setting, by means of the tgtd,a callback function, and acquiring, by means of the callback function,the real-time processing result of the current task comprises: by meansof the tgtd, setting the callback function, and transmitting thecallback function and the task parameter to the block storage service,whereby the block storage service calls the callback function to returna corresponding real-time processing progress to the tgtd when a targetprogress state corresponding to the task parameter has an update. 17.The electronic device according to claim 16, wherein the returning thereal-time processing result to the tgtadm by means of the ISCSI target,whereby the tgtadm displays the real-time processing result on ahuman-computer interface comprises: by means of the ISCSI target,parsing the corresponding real-time processing progress, calculating acorresponding progress percentage, and then returning the correspondingprogress percentage to the tgtadm, whereby the tgtadm converts thecorresponding progress percentage into a corresponding progress bar, anddisplays the corresponding progress bar on the human-computer interface.18. The electronic device according to claim 16, wherein the acquiring,by means of the callback function, the real-time processing result ofthe current task further comprises: acquiring an error code of thecurrent task by means of the callback function.
 19. The non-transitorycomputer-readable storage medium according to claim 10, wherein thetransmitting the task parameter to an ISCSI target by means of tgtadmcomprises: transmitting the task parameter to the ISCSI target by meansof the tgtadm and on the basis of an IPC (Inter-Process Communication)manner.
 20. The non-transitory computer-readable storage mediumaccording to claim 10, wherein the returning the real-time processingresult to the tgtadm by means of the ISCSI target comprises: returningthe real-time processing result to the tgtadm by means of the ISCSItarget and on the basis of an IPC (Inter-Process Communication) manner.21. The non-transitory computer-readable storage medium according toclaim 10, wherein at the same time as the starting, by means of tgtd, adedicated thread for processing a task corresponding to the taskparameter, the method further comprises: deleting a file descriptor (fd)from epoll monitoring.